<?php
require 'functions.php';

$session = new \Models\MySession();

if ($_POST) {            
   try {
    $userRegistration = new Models\User;  
    $userRegistration->registration($_POST['user_name'], $_POST['password'], $_POST['email']);      
                   
   } catch (\Exception $exc) {
            echo  $exc->getMessage();
   } 
 }    

$data['userGreeting'] = '';
@$data['isLogged'] = $_SESSION['isLogged'];
$data['title'] = 'Registration';
$data['content'] = './public_html/registration_public.php';
$data['header'] = './inc/header.php';
render($data, $layout);
